package at.fhooe.tuxgestures.cam.resources;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class Resources
{
	
	private static Properties properties;
	
	private static Properties getProperties() {
		if(properties == null) {
			properties = new Properties();
			 try {
				 InputStream s = properties.getClass().getResourceAsStream("/calibration.properties");
				 properties.load(s);
				s.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return properties;
	}
	
	public static int getCalibrationIntValue(String key)
	{
		return Integer.parseInt(getProperties().getProperty(key).trim());
	}
	
}
